import Mock from 'mockjs'

// mock 模拟数据
const data = Mock.mock({
  'todolist|10': [{
    'title': '@ctitle',
    'id': '@id',
    'isChecked': '@boolean'
  }]
})

// mock拦截
Mock.mock('/api/todolist', 'get', () => {
  return {
    code: 200,
    data: data.todolist
  }
})